Optimal. Leaf size=94 \[ -\frac{b^2 x^{n-1} \sqrt{a^2+2 a b x^n+b^2 x^{2 n}}}{(1-n) \left (a b+b^2 x^n\right )}-\frac{a \sqrt{a^2+2 a b x^n+b^2 x^{2 n}}}{x \left (a+b x^n\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0330818, antiderivative size = 94, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.071, Rules used = {1355, 14} \[ -\frac{b^2 x^{n-1} \sqrt{a^2+2 a b x^n+b^2 x^{2 n}}}{(1-n) \left (a b+b^2 x^n\right )}-\frac{a \sqrt{a^2+2 a b x^n+b^2 x^{2 n}}}{x \left (a+b x^n\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1355
Rule 14
Rubi steps
\begin{align*} \int \frac{\sqrt{a^2+2 a b x^n+b^2 x^{2 n}}}{x^2} \, dx &=\frac{\sqrt{a^2+2 a b x^n+b^2 x^{2 n}} \int \frac{a b+b^2 x^n}{x^2} \, dx}{a b+b^2 x^n}\\ &=\frac{\sqrt{a^2+2 a b x^n+b^2 x^{2 n}} \int \left (\frac{a b}{x^2}+b^2 x^{-2+n}\right ) \, dx}{a b+b^2 x^n}\\ &=-\frac{a \sqrt{a^2+2 a b x^n+b^2 x^{2 n}}}{x \left (a+b x^n\right )}-\frac{b^2 x^{-1+n} \sqrt{a^2+2 a b x^n+b^2 x^{2 n}}}{(1-n) \left (a b+b^2 x^n\right )}\\ \end{align*}
Mathematica [A] time = 0.0251198, size = 42, normalized size = 0.45 \[ \frac{\sqrt{\left (a+b x^n\right )^2} \left (-a n+a+b x^n\right )}{(n-1) x \left (a+b x^n\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.018, size = 61, normalized size = 0.7 \begin{align*} -{\frac{a}{ \left ( a+b{x}^{n} \right ) x}\sqrt{ \left ( a+b{x}^{n} \right ) ^{2}}}+{\frac{b{x}^{n}}{ \left ( a+b{x}^{n} \right ) \left ( -1+n \right ) x}\sqrt{ \left ( a+b{x}^{n} \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00533, size = 30, normalized size = 0.32 \begin{align*} -\frac{a{\left (n - 1\right )} - b x^{n}}{{\left (n - 1\right )} x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.60517, size = 43, normalized size = 0.46 \begin{align*} -\frac{a n - b x^{n} - a}{{\left (n - 1\right )} x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{\left (a + b x^{n}\right )^{2}}}{x^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{b^{2} x^{2 \, n} + 2 \, a b x^{n} + a^{2}}}{x^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]